package org.example;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;

/**
 * 启动类
 * <a href="http://localhost:9199/swagger-ui/index.htm">...</a>
 *
 * @author
 */
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    /**
     * 启动时打印文档api地址
     *
     */
    @Bean
    public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
        return args -> {
            System.out.print("\n------------------------->>>>>");
            System.out.print("文档api地址： http://localhost:9199/doc.html");
            System.out.println("<<<<<-------------------------\n");
        };
    }


}
